const { defineConfig } = require('@vue/cli-service')
// const AutoImport = require('unplugin-auto-import/webpack')
// const Components = require('unplugin-vue-components/webpack')
// const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')
module.exports = defineConfig({

    transpileDependencies: true,

    publicPath: "./", //项目访问地址

    outputDir: "../fast-sso-server/src/main/resources/static/", //构建好的文件输出到哪里

    devServer: {
        port: 9000,
        host: '0.0.0.0', // 允许外部ip访问
        hot: true,//用于设置代码保存时是否进行热更新（局部刷新，不刷新整个页面）
        open: true,//用于设置 server 启动后是否自动打开浏览器
        proxy: {
            '/sso' : {
                target: 'http://127.0.0.1:9090',
            }
        }
    },
    // plugins: [
        // AutoImport({
        //     resolvers: [ElementPlusResolver()],
        // }),
        // Components({
        //     resolvers: [ElementPlusResolver()],
        // }),
    // ],
})